package fjh.Interface;
import java.util.Scanner;
public class Function_Test {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        Person person=new Person();

        Dailup dailup;
        Play play;
        TakePhoto takePhoto;

        System.out.println("请选择您要使用的设备：（1，大哥大 2，DVD 3，照相机 4，8848钛合金手机）");
        int choose=input.nextInt();
        switch(choose)
        {
            case 1:
                dailup=new Telephone();
                person.dailup(dailup);
                System.exit(1);
            case 2:
                play=new Dvd();
                person.play(play);
                System.exit(1);
            case 3:
                takePhoto=new Camera();
                person.takePhone(takePhoto);
                System.exit(1);
            case 4:
               System.out.println("请选择您要玩的功能（1，电话 2，播放 3，拍照）");
               int choose2=input.nextInt();
               switch (choose2)
               {
                   case 1:
                       dailup=new Mobile();
                       person.dailup(dailup);
                       System.exit(1);
                   case 2:
                       play=new Mobile();
                       person.play(play);
                       System.exit(1);
                   case 3:
                       takePhoto=new Mobile();
                       person.takePhone(takePhoto);
                       System.exit(1);
                   default:
                       System.out.println("选择错误");
                       System.exit(1);
               }
                System.exit(1);
            default:
                System.out.println("选择错误");
                System.exit(1);

        }
    }
}
